

/* Select SPI TOUCH: Chip Select pin high */
#define SPI_TOUCH_CS_LOW()       GPIO_ResetBits(GPIOB, GPIO_Pin_7)
/* Deselect SPI FLASH: Chip Select pin high */
#define SPI_TOUCH_CS_HIGH()      GPIO_SetBits(GPIOB, GPIO_Pin_7)

void GPIO_Configuration();
void TSC2046_SPI_config();
void TSC2046_Init();

unsigned char SPI_WriteByte(unsigned char data);
void SpiDelay(unsigned int DelayCnt);
/**
  * @brief  Read X pressed position
  * @param  None
  * @retval Raw X position
  */
uint16_t TSC2046_ReadRawX(void);

/**
  * @brief  Read Y pressed position
  * @param  None
  * @retval Raw Y position
  */
uint16_t TSC2046_ReadRawY(void);

/**
  * @brief  Read virtual value of Y in pixel
  * @param  None
  * @retval Y value
  */
int32_t TSC2046_MeasureX(void);

/**
  * @brief  Read virtual value of Y in pixel
  * @param  None
  * @retval Y value
  */
int32_t TSC2046_MeasureY(void);
void GetScreenZone();

/**
  * @brief  Read current temperature build in tsc2046
  * @param  None
  * @retval Temp read
  */
uint16_t TSC2046_ReadAmbiantTemp();
